<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php echo $title_for_layout; ?></title>
<meta name="keywords" content="<?php echo $keywords; ?>" />
<meta name="description" content="<?php echo $description; ?>" />
<meta name="author" content="shinrun.com">
<link href="/css/normalize.css" rel="stylesheet" type="text/css" media="all">
<link href="/css/shinrun.v20120203.css" rel="stylesheet" type="text/css" media="all">
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<!-- Adding "maximum-scale=1" fixes the Mobile Safari auto-zoom bug: http://filamentgroup.com/examples/iosScaleBug/ -->
<meta name="google-site-verification" content="Q7tZqSkqsXIX_FfqdXkKd79eiqH1tWn8NAeoWxBV_sI" />
<!--[if lt IE 9]>
	<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<?php echo $scripts_for_layout; ?>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-21656463-2']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</head>
<body lang="zh">
	<header>
		<div id="logo">
        	<a href="http://www.shinrun.com" target="_blank"><img src="/img/shinrun_logo.png" width="260" height="56" alt="shinrun logo"></a>
            <p>专注互联网研发、移动互联网、网页设计及动画相关技术</p>
        </div>
        <div id="search_box">
        	<form action="/articles/search" method="post" enctype="application/x-www-form-urlencoded" name="search_form" id="search_form" onsubmit="javascript:return (document.getElementById('search_kw').value != '');">
            	<input id="search_kw" name="search_kw" type="text">
                <input name="submit" type="submit" value=" ">
            </form>
        </div>
	</header>
    <nav>
        <ul>
			<li class="nav_home"><a href="/"><span><img src="/img/home.png" width="24" height="24" alt="home ico">首页</span></a></li>
            <?php $count_cates = count($categories); ?>
            <?php $i = 0; ?>
            <?php $a_class = "nav_category"; ?>
			<?php foreach($categories as $key => $val): ?>
            <?php $i++; ?>
            <?php $a_class = ($count_cates != $i) ? 'class="nav_category"' : 'class="nav_category nav_border"'; ?>
            <li <?php echo (isset($category['Category']['id']) && ($category['Category']['id'] == $key)) ? 'class="nav_category nav_selected"' : $a_class; ?>><a href="/<?php echo $aider->linkalias($key); ?>" title="<?php echo $val; ?>"><span><?php echo $val; ?></span></a></li>
            <?php endforeach; ?>
		</ul>
        <ul class="nav_tag_list">
        	<li class="nav_tag_title">随机标签 ›› </li>
        	<?php  if (!empty($tags)) foreach($tags as $k => $v): ?>
        	<li><a href="/articles/view/<?php echo $k; ?>"><?php echo $v; ?></a></li>
            <?php endforeach; ?>
        </ul>
	</nav>
    
    <section class="section_1">
		<?php echo $content_for_layout; ?>
        <?php echo $this->element('sql_dump'); ?>
    </section>
    <footer>
			&copy;<?php echo date('Y'); ?> <span class="font_italic">SHINRUN.COM</span> | <a href="/htmls/statement.html" title="欣然声明" target="_blank">本站声明</a> | <a href="/contact">联系方式</a> | 本站作品采用 <a rel="license" href="http://creativecommons.org/licenses/by/2.5/cn/"><img alt="知识共享许可协议" style="border-width:0;" src="http://i.creativecommons.org/l/by/2.5/cn/80x15.png" /></a> <a rel="license" href="http://creativecommons.org/licenses/by/2.5/cn/">知识共享署名 2.5 中国大陆许可协议</a> 进行许可。转载本站内容，请注明出处。
    </footer>
</body>
</html>